import axios from '@/libs/api.request'

export const getPassports = () => {
  return axios.request({
    url: '/getPassports',
    method: 'get'
  })
}

export const getMenuAccess = () => {
  return axios.request({
    url: '/getMenuAccess',
    method: 'get'
  })
}

export const getGroups = () => {
  return axios.request({
    url: '/getGroups',
    method: 'get'
  })
}

export const setGroupAccess = (data) => {
  return axios.request({
    url: '/setGroupAccess',
    method: 'post',
    data
  })
}

export const addGroup = (param) => {
  return axios.request({
    url: '/addGroup',
    method: 'post',
    params: param
  })
}

export const addUser = (data) => {
  return axios.request({
    url: '/addUser',
    method: 'post',
    data: data
  })
}

export const updatePwd = (data) => {
  return axios.request({
    url: '/changeUserPwd',
    method: 'post',
    data: data
  })
}
